import request from "@/utils/request";

export const addSongList = (params) =>{
    return request.post(
        `api/doc/song/list/add`,
        params,
    )
}

export const getMySongList = () =>{
    return request.get(`api/doc/song/list/my/list`)
}
export const getMyLoveSongList = () =>{
    return request.get(`api/doc/song/list/love/list`)
}
export const querySongList = (page, size, params)=>{
    return request.get(
     `api/doc/song/list/${page}/${size}/list/ext`,
     params,
    )
}

export const getSongListById = async (id)=>{
    return await request.get(
        `api/doc/song/list/${id}/info/ext`,
    )
}


export const updateSongList = (params) =>{
    return request.put(
        `api/doc/song/list/update`,
        params,
    )
}

export const addSongListMusic = (params) =>{
    return request.post(
        `api/doc/song/list/add/music`,
        params,
    )
}

export const addSongListNum = (songListId,type) => {
    return request.post(
     `api/doc/song/list/add/${type}/num/${songListId}/ext`,{}
    )
}
export const addSongListLove = (songListId,type) => {
    return request.post(
     `api/doc/song/list/add/love`,{songListId:songListId,type:type}
    )
}

export const deleteSongList = (id)=>{
    return request.post(
        `api/doc/song/list/delete/${id}`
    )
}
